{extend name="public:base" /}
{block name="content"}

<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>
<div class="page-header">
	<a href="{:url('PluginSlide/add')}" class="btn btn-primary">新增</a>
</div>	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<th>图片</th>
						<th>链接</th> 
						<th>标题</th>  
						<th>状态</th>  
				
						<th>操作</th>				
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="data" empty="$empty"}
						<tr>
							<td>
								{if condition="$data['image']"}
		                  		<img src="IMG_ROOT{$data.image|resize=100,100}" title="{$data.title}" />
			                  	{else /}
			                  		<img src="__PUBLIC__/image/no_image_100x100.jpg" title="暂无图片" />
			                  	{/if}
							</td>
							<td>
								电脑端：{$data.pc_url}<br />
								手机端：{$data.mobile_url}
							</td>
							<td>{$data.title}</td>
							<td>								
							{switch name="data.status"}
								{case value="1"}<a href='{:url("PluginSlide/set_status",array("id"=>$data["slide_id"],"status"=>0))}'><span class="btn btn-xs btn-success"><i class="fa fa-check bigger-120"></i></span></a>{/case}
								{case value="0"}<a href='{:url("PluginSlide/set_status",array("id"=>$data["slide_id"],"status"=>1))}'><span class="btn btn-xs btn-danger"><i class="fa fa-remove bigger-120"></i></span></a>{/case}
							{/switch}
							</td>
							
							<td>
								<a  class="btn btn-xs btn-info" href='{:url("PluginSlide/edit",array("id"=>$data["slide_id"]))}'>
									<i class="fa fa-edit bigger-120"></i>
								</a> 
								<a class="delete btn btn-xs btn-danger" href='{:url("PluginSlide/del",array("id"=>$data["slide_id"]))}' >
									<i class="fa fa-trash bigger-120"></i>
								</a>
							</td>
						</tr>
						{/volist}	
						
						<tr>
							<td colspan="20" class="page">{$list->render()}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}